# -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url


urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'warehouse.views.home', name='home'),
    url(r'^project/$', 'warehouse.views.project'),
    
    url(r'^commodity/$', 'warehouse.views.commodity'),
    url(r'^commodity/(?P<id>\d)/buyhistory', 'warehouse.views.commodity_buyhistory'),
    
    url(r'^pr/$', 'warehouse.views_pr.pr_list'),#pr列表
    url(r'^pr/add$', 'warehouse.views_pr.pr_add'),#添加pr
    url(r'^pr/(?P<pr_id>\d)/$', 'warehouse.views_pr.pr_detail'),#修改pr
    url(r'^pr/(?P<pr_id>\d)/log$', 'warehouse.views_pr.pr_log'),#pr log
    url(r'^pr/(?P<pr_id>\d)/do/(?P<do>\w+)/$', 'warehouse.views_pr.pr_do'),#操作pr，比如批准，否据    
    url(r'^pr/(?P<pr_id>\d)/add$', 'warehouse.views_pr.pr_item_add_edit'),#添加pr条目
    url(r'^pr/(?P<pr_id>\d)/(?P<pri_id>\d)/$', 'warehouse.views_pr.pr_item_add_edit'),#修改pr条目
    url(r'^pr/(?P<pr_id>\d)/(?P<pri_id>\d)/del$', 'warehouse.views_pr.pr_item_del'),#删除pr条目
    # url(r'^warehouse/', include('warehouse.foo.urls')), 
    
    url(r'^po/$', 'warehouse.views_po.po_list'),#pr列表
    url(r'^po/add$', 'warehouse.views_po.po_add'),#添加pr
    url(r'^po/(?P<po_id>\d)/$', 'warehouse.views_po.po_detail'),#修改pr
    url(r'^po/(?P<po_id>\d)/log$', 'warehouse.views_po.po_log'),#pr log
    url(r'^po/(?P<po_id>\d)/do/(?P<do>\w+)/$', 'warehouse.views_po.po_do'),#操作pr，比如批准，否据    
    url(r'^po/(?P<po_id>\d)/add$', 'warehouse.views_po.po_item_add_edit'),#添加pr条目
    url(r'^po/(?P<po_id>\d)/(?P<poi_id>\d)/$', 'warehouse.views_po.po_item_add_edit'),#修改pr条目
    url(r'^po/(?P<po_id>\d)/(?P<poi_id>\d)/del$', 'warehouse.views_po.po_item_del'),#删除pr条目
    

    url(r'^re/$', 'warehouse.views_re.list'),#pr列表
    url(r'^re/add$', 'warehouse.views_re.add'),#添加pr
    url(r'^re/(?P<id>\d)/$', 'warehouse.views_re.detail'),#修改pr
    url(r'^re/(?P<id>\d)/log$', 'warehouse.views_re.log'),#pr log
    url(r'^re/(?P<id>\d)/do/(?P<do>\w+)/$', 'warehouse.views_re.do'),#操作pr，比如批准，否据    
    url(r'^re/(?P<id>\d)/add$', 'warehouse.views_re.item_add_edit'),#添加pr条目
    url(r'^re/(?P<id>\d)/(?P<item_id>\d)/$', 'warehouse.views_re.item_add_edit'),#修改pr条目
    url(r'^re/(?P<id>\d)/(?P<item_id>\d)/del$', 'warehouse.views_re.item_del'),#删除pr条目
    
    url(r'^so/$', 'warehouse.views_so.list'),#pr列表
    url(r'^so/add$', 'warehouse.views_so.add'),#添加pr
    url(r'^so/(?P<id>\d)/$', 'warehouse.views_so.detail'),#修改pr
    url(r'^so/(?P<id>\d)/log$', 'warehouse.views_so.log'),#pr log
    url(r'^so/(?P<id>\d)/do/(?P<do>\w+)/$', 'warehouse.views_so.do'),#操作pr，比如批准，否据    
    url(r'^so/(?P<id>\d)/add$', 'warehouse.views_so.item_add_edit'),#添加pr条目
    url(r'^so/(?P<id>\d)/(?P<item_id>\d)/$', 'warehouse.views_so.item_add_edit'),#修改pr条目
    url(r'^so/(?P<id>\d)/(?P<item_id>\d)/del$', 'warehouse.views_so.item_del'),#删除pr条目
    
    url(r'^pa/$', 'warehouse.views_pa.list'),#pr列表
    url(r'^pa/add$', 'warehouse.views_pa.add'),#添加pr
    url(r'^pa/(?P<id>\d)/$', 'warehouse.views_pa.detail'),#修改pr
    url(r'^pa/(?P<id>\d)/log$', 'warehouse.views_pa.log'),#pr log
    url(r'^pa/(?P<id>\d)/do/(?P<do>\w+)/$', 'warehouse.views_pa.do'),#操作pr，比如批准，否据 
    
     
)


